<template>
  <div class="dh-tabbar fixed">
    <dh-tabbar-item :to="'/home'" :class="{selected:(this.$route.path.indexOf('/home')==0)}">
      <i class="icon-shouye iconfont" slot="icon"></i> 首页
    </dh-tabbar-item>
    <dh-tabbar-item :to="'/cash/index'" :class="{selected:(this.$route.path.indexOf('/cash')==0)}">
      <i class="icon-tixian iconfont" slot="icon"></i> 提现
    </dh-tabbar-item>
    <dh-tabbar-item :to="'/check'" :class="{selected:(this.$route.path.indexOf('/check')==0)}">
      <i class="icon-shenhe1 iconfont" slot="icon"></i> 亲友群审核
    </dh-tabbar-item>
    <dh-tabbar-item :to="'/diamond'" :class="{selected:(this.$route.path.indexOf('/diamond')==0)}">
      <i class="icon-zuanshi2 iconfont" slot="icon"></i> 赠送钻石
    </dh-tabbar-item>
    <dh-tabbar-item :to="'/my'" :class="{selected:(this.$route.path.indexOf('/my')==0)}">
      <i class="icon-gerenshezhi iconfont" slot="icon"></i> 个人设置
    </dh-tabbar-item>
  </div>
</template>
<script>
  import DhTabbarItem from "./TabbarItem";
  export default {
    name: "dh-tabbar",
    components: {
      DhTabbarItem
    },
    data() {
      return {
        isSelected: 0
      };
    },
    methods: {
      update: function() {
        console.log('push')
        this.$router.push({
          path: "/cash/index"
        });
      }
    }
  };
</script>
<style lang="scss" scoped>
  .dh-tabbar {
    background-image: -webkit-gradient( linear, left top, left bottom, from(#d9d9d9), color-stop(50%, #d9d9d9), color-stop(50%, transparent));
    background-image: linear-gradient( 180deg, #d9d9d9, #d9d9d9 50%, transparent 50%);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: top left;
    position: relative;
    background-color: #fffbef;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    right: 0;
    bottom: 0;
    left: 0;
    position: absolute;
    text-align: center;
    min-width: 320px;
    max-width: 640px;
    margin: 0 auto;
    z-index: 1000;
    &.fixed {
      right: 0;
      bottom: 0;
      left: 0;
      position: fixed;
    }
    .barItem {
      width: 20%;
      font-size: 12px;
    }
  }
</style>


